package com.lhkj.ct.meta.modules.scheduling.model.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.lhkj.ct.base.json.MyLocalTimeDeserializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.time.LocalTime;

/**
 * <p>
 *     排班时间段
 * </p>
 */
@Setter
@Getter
public class SchedulingTime implements Serializable {

    @NotNull(message = "请设置号源数量")
    @Positive(message = "号源数量必须大于0")
    @ApiModelProperty("号源数量")
    private Integer num;

    @NotNull(message = "请设置开始时间")
    @ApiModelProperty(value = "开始时间", example = "09:00")
    @JsonDeserialize(using = MyLocalTimeDeserializer.class)
    private LocalTime start;

    @NotNull(message = "请设置截止时间")
    @ApiModelProperty(value = "截止时间", example = "10:00")
    @JsonDeserialize(using = MyLocalTimeDeserializer.class)
    private LocalTime end;
}
